package com.samoiloff.ui.list.smart.view {
	import com.samoiloff.framework.AbstractView;
	import com.samoiloff.ui.common.RectMc;
	import com.samoiloff.ui.list.smart.SmartList;
	import com.samoiloff.ui.scroll.resize.ResizeScroll;

	/**
	 * @author Samoiloff
	 */
	public class SmartListView extends AbstractView {
		
		private var _scroll			: ResizeScroll;
		private var _viewport		: SmartListViewport;
		private var _renderers		: SmartListRenderers;
		private var _bgMc			: RectMc;

		public function SmartListView(mainMc:SmartList) {
			super(mainMc);
			
			_scroll = new ResizeScroll();
			_viewport = new SmartListViewport();
			_renderers = new SmartListRenderers();
			_bgMc = new RectMc();
		}

		
		override public function destroy(): void {
			_scroll.destroy();
			
			_renderers.destroy();
			_bgMc = null;
			
			super.destroy();
		}

		
		public function get scroll(): ResizeScroll {
			return _scroll;
		}
		
		public function get viewport(): SmartListViewport {
			return _viewport;
		}
		
		public function get renderers(): SmartListRenderers {
			return _renderers;
		}
		
		public function get bgMc(): RectMc {
			return _bgMc;
		}
		
		public function get component() : SmartList {
			return _mainMc as SmartList;
		}
	}
}
